Docker publish workflow#115
Conversation
New Features
Modern frontend build and bundling setup with Node/Yarn support and asset compilation
CORS support enabled for API compatibility
Chores
Updated build tooling and runtime dependencies; added image processing support in the runtime environment
Docker and compose improvements for build steps and persistent logs/cache; adjusted ignore rules
Tests
Added test bootstrap and improved server-error assertion in endpoint tests
Documentation
Added instructions to build and publish frontend assets
---------
Co-authored-by: Tatevik <tatevikg1@gmail.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR migrates the PHPLIST application from listening on port 80 to port 8081 by adding Apache vhost configuration, updating Docker Compose port mapping and environment URLs, mounting Apache configs into the container, and introducing a GitHub Actions workflow for automated Docker image building and publishing to Docker Hub. ChangesPort 8081 Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
.github/workflows/docker-publish.yml (1)
19-19: 💤 Low valueConsider using ubuntu-latest for automatic updates.
The workflow specifies
ubuntu-22.04explicitly. While this provides consistency, usingubuntu-latestwould automatically benefit from GitHub's runner updates and security patches without requiring workflow changes.Suggested change
docker: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest permissions: contents: read🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/docker-publish.yml at line 19, Update the GitHub Actions runner specification by changing the runs-on value from "ubuntu-22.04" to "ubuntu-latest" so the workflow automatically uses GitHub's updated Ubuntu runner; locate the runs-on: ubuntu-22.04 entry in the workflow file and replace it with runs-on: ubuntu-latest, then run or validate the workflow to ensure no runner-specific assumptions break.docker/apache/000-default.conf (1)
1-12: Consider mounting the VirtualHost config directly tosites-enabledor explicitly enabling the site.The configuration is mounted to
/etc/apache2/sites-available/, relying on a pre-existing symlink from the basephp:8.1-apacheimage to activate it. For clarity and to follow Apache best practices, either:
- Mount directly to
/etc/apache2/sites-enabled/000-default.conf, or- Add
a2ensite 000-defaultto the startup command in docker-composeThis removes ambiguity about whether the site is properly enabled.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docker/apache/000-default.conf` around lines 1 - 12, The VirtualHost entry (VirtualHost *:8081, ServerName app in 000-default.conf) is being mounted into sites-available and may not be enabled; either mount this config directly into the sites-enabled location (e.g., as 000-default.conf) so Apache picks it up, or ensure the container startup enables it by adding a2ensite 000-default to the service startup/entrypoint in docker-compose; update the compose mount or startup command accordingly so the VirtualHost is unambiguously enabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/docker-publish.yml:
- Around line 3-12: The workflow currently only triggers for the branch named
"docker-publish" under the on: push and on: pull_request blocks; update those
blocks so they include "main" (e.g., add "main" alongside "docker-publish" in
the branches lists for push and pull_request) so pushes and PRs to main will
trigger the workflow while leaving the tags ('v*') behavior unchanged; refer to
the "on: push" and "on: pull_request" sections in the workflow file to make this
change.
- Around line 44-47: The current tag entry
"type=raw,value=test,enable={{is_default_branch}}" won't apply on the
docker-publish branch; update the tags section so the "test" tag is enabled when
building from the intended branch (either change the enable condition from
is_default_branch to a branch-name check for "docker-publish" or other target
branch, or change the workflow trigger to run on the default branch), e.g.,
modify the enable expression for the tag in the tags block (the line referencing
type=raw,value=test,enable={{is_default_branch}}) or adjust the workflow
triggers so they align.
- Line 15: The workflow is publishing to a personal Docker Hub image: the
DOCKERHUB_IMAGE variable currently set to "tatevikg1/phplist4" should be changed
to the official organization image (e.g., "phplist/base-distribution" or your
org's canonical repo) to ensure proper ownership and continuity; update the
DOCKERHUB_IMAGE value in the workflow and also rotate/update any related secrets
(Docker Hub username/password or token referenced by the workflow) to use the
organization account credentials so the publish step continues to authenticate
and push successfully.
In `@docker-compose.yml`:
- Line 4: Replace the personal Docker Hub image reference "image:
tatevikg1/phplist:test" with the organization's Docker Hub repository (e.g.,
"image: <ORG_USERNAME>/phplist:test"); update the image value in the
docker-compose service where "image: tatevikg1/phplist:test" appears so it
points to the organization account and tag used by your CI/workflows.
---
Nitpick comments:
In @.github/workflows/docker-publish.yml:
- Line 19: Update the GitHub Actions runner specification by changing the
runs-on value from "ubuntu-22.04" to "ubuntu-latest" so the workflow
automatically uses GitHub's updated Ubuntu runner; locate the runs-on:
ubuntu-22.04 entry in the workflow file and replace it with runs-on:
ubuntu-latest, then run or validate the workflow to ensure no runner-specific
assumptions break.
In `@docker/apache/000-default.conf`:
- Around line 1-12: The VirtualHost entry (VirtualHost *:8081, ServerName app in
000-default.conf) is being mounted into sites-available and may not be enabled;
either mount this config directly into the sites-enabled location (e.g., as
000-default.conf) so Apache picks it up, or ensure the container startup enables
it by adding a2ensite 000-default to the service startup/entrypoint in
docker-compose; update the compose mount or startup command accordingly so the
VirtualHost is unambiguously enabled.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 078c070d-712c-4878-8faa-f7a5ab81162b
📒 Files selected for processing (5)
.github/workflows/docker-publish.ymldocker-compose.ymldocker/apache/000-default.confdocker/apache/ports.confdocker/apache/servername.conf
| workflow_dispatch: | ||
|
|
||
| env: | ||
| DOCKERHUB_IMAGE: tatevikg1/phplist4 |
There was a problem hiding this comment.
Major: Use organization Docker Hub account instead of personal account.
The workflow uses tatevikg1/phplist4, which appears to be a personal Docker Hub account. For the official phpList project, this should use an organization account (e.g., phplist/base-distribution or similar) to ensure:
- Proper ownership and access control
- Continuity if the personal account becomes unavailable
- Professional branding for the official project
📝 Suggested change
env:
- DOCKERHUB_IMAGE: tatevikg1/phplist4
+ DOCKERHUB_IMAGE: phplist/base-distributionNote: Update the corresponding secrets to use the organization account credentials.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| DOCKERHUB_IMAGE: tatevikg1/phplist4 | |
| env: | |
| DOCKERHUB_IMAGE: phplist/base-distribution |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/docker-publish.yml at line 15, The workflow is publishing
to a personal Docker Hub image: the DOCKERHUB_IMAGE variable currently set to
"tatevikg1/phplist4" should be changed to the official organization image (e.g.,
"phplist/base-distribution" or your org's canonical repo) to ensure proper
ownership and continuity; update the DOCKERHUB_IMAGE value in the workflow and
also rotate/update any related secrets (Docker Hub username/password or token
referenced by the workflow) to use the organization account credentials so the
publish step continues to authenticate and push successfully.
Summary
Thanks for contributing to phpList!
Summary by CodeRabbit